<div class="text_area">
	{if $messageList}
		{foreach from=$messageList item='message'}
			<h2>
				{if $message.fk_from_user_id == $loggedUser.uid}
					{assign var = 'user' value=$message.to}
				{else}
					{assign var='user' value=$message.from}
				{/if}
				<a href="{$actualState.id}/{$user.username}.html">Chat s používateľom {$user.username}</a>
			</h2>
			<p{if $message.is_read == 0} style="font-weight: bold;"{/if}>{humandate starttime=$message.crdate} <strong>{$message.from.username}</strong>: {$message.bodytext|nl2br}</p>
		{/foreach}
		{if $pages}
			<div class="pager">
				{foreach from=$pages item='page' name='pager'}
					{if $actualState.page == $page}
						<strong>{$page}</strong>
					{elseif $page == 1 && !$actualState.page}
						<strong>{$page}</strong>
					{else}
						<a href="{$actualState.id}/strana-{$page}.html">{$page}</a>
					{/if}
				{/foreach}
			</div>
		{/if}
	{else}
		<p>Žiadne správy</p>
	{/if}
</div>